<template>
	<view class="recommend-shop">
		<view class="recommend-shop-item" v-for="item in goodsDataLists" :key="item.cat_id" @click="navigator(item.goods_id)">
			<image :src="item.goods_big_logo" />
			<view class="goods_price">￥{{ item.goods_price }}</view>
			<view class="shop_infos">{{ item.goods_name }}</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:['goodsDataLists'],
		data(){
			return{
				
			}
		},
		methods:{
			navigator(id){
				console.log(id,"我拿到了...")
				this.$emit('goodsItemClick',id);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.recommend-shop{
		display: flex;
		flex-wrap: wrap;
		.recommend-shop-item{
			width: 363rpx;
			background-color: #FFFFFF;
			margin: 0 5rpx;
			margin-bottom: 10rpx;
			border-radius: 10rpx;
			image{
				width: 100%;
				height: 300rpx;
				border-bottom-right-radius: 10rpx;
				border-top-right-radius: 10rpx;
			}
			.goods_price{
				color:#ff0025;
				margin: 0 20rpx;
				display: flex;
				justify-content: space-between;
				font-size: 40rpx;
				text{
					font-size: 32rpx;
					text-decoration:line-through;
					color: #ccc;
				}
			}
			.shop_infos{
				text-indent: 20rpx;
				text-overflow:ellipsis;
				display:-webkit-flex;
				-webkit-box-orient:vertical;
				-webkit-line-clamp:2;
				margin: 0 20rpx;
				padding-bottom: 20rpx;
				font-size: 13px;
				color: #999999;
			}
		}
	}
</style>
